<?php
	require_once(dirname(__FILE__)."/../include/admin/achievement_data.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh" xml:lang="zh">
<head>
	<title>竞赛成绩</title>
	<style type="text/css">
	/*<![CDATA[*/
	.w{width:330px}
	/*]]>*/
	</style>
</head>
<body>
	<h1 style="text-align:left;padding-top:20px;font-weight:300;width:100%;font-size:23px;color:purple">添加竞赛成绩：</h1>
	<form action="#" method="post">
		<table border="0" cellspacing="0" cellpadding="0" style="font-size:18px">
			<tr>
				<td>
					<span style="color:red">*</span>
					赛事名称：
				</td>
				<td>
					<input type="text" name="cname" class="w" />
				</td>
			</tr>
			<tr>
				<td>
					<span style="color:red">*</span>
					参赛时间：
				</td>
				<td>
					<input type="text" name="cdate" class="w" />
					<span style="color:red">[格式：yyyy-mm-dd]</span>
				</td>
			</tr>
			<tr>
				<td>
					<span style="color:red">*</span>
					队伍名称：
				</td>
				<td>
					<input type="text" name="teamname" class="w" />
				</td>
			</tr>
			<tr>
				<td>
					<span style="color:red">*</span>
					队员名字：
				</td>
				<td>
					<input type="text" name="teammember" class="w" />
				</td>
			</tr>
			<tr>
				<td>获奖情况：</td>
				<td>
					<input type="text" name="award" class="w" />
				</td>
			</tr>
			<tr>
				<td>指导老师:</td>
				<td>
					<input type="text" name="coach" class="w" />
				</td>
			</tr>
			<tr valign="top">
				<td>附加信息(介绍详情)：</td>
				<td >
					<textarea name="extra" cols="40" rows="8"></textarea>
				</td>
			</tr>
			<tr>
				<td></td>
				<td>
					<input type="submit" name="add" value="添加获奖" />
				</td>
			</tr>
		</table>
	</form>
	<br />
	<form action="#" method="post">
		<span style="font-weight:bold">
			<?php echo $year; ?>年度:</span>
			<select name="year">
			<?php
				foreach($PageArray["yearlist"] as $Object){
					$select = "";
					if (intval($year) == intval($Object))
						$select = "selected = \"selected\"";
			?>
				<option <?php echo $select; ?> ><?php echo $Object; ?></option>
			<?php }?>
			</select>
		<input type="submit" name="query" value="查询"/>
	</form>
	<style type="text/css">#contest td{ padding: 10px 20px 10px 20px}</style>
	<h1 style="text-align:left;padding-top:20px;font-weight:300;width:100%;font-size:20px;color:purple">历来的竞赛成绩列表：</h1>
	<table border="1" cellspacing="0" cellpadding="0" id="contest" style="width:100%;font-size:13px">
		<tr style="height:40px">
			<th>
				<span style="color:red">*</span>
				赛事
			</th>
			<th>
				<span style="color:red">*</span>
				日期
			</th>
			<th>
				<span style="color:red">*</span>
				队伍
			</th>
			<th>
				<span style="color:red">*</span>
				队员
			</th>
			<th>成绩</th>
			<th>指导老师</th>
			<th>操作</th>
		</tr>
		<?php
			foreach($PageArray["recordlist"] as $Object){
		?>
		<tr>
			<form action="" method="post">
				<input type="hidden" name="year" value="<?php echo $year; ?>"/>
				<input type="hidden" name="id" value="<?php echo $Object->id;?>" />
				<td>
					<input type="text" name="cname" value="<?php echo $Object->cname;?>" /></td>
				<td>
					<input style="width:70px" type="text" name="cdate" value="<?php echo $Object->cdate;?>" /></td>
				<td>
					<input style="width:80px"  type="text" name="teamname" value="<?php echo $Object->teamname;?>" /></td>
				<td>
					<input type="text" name="teammember" value="<?php echo $Object->teammember;?>" /></td>
				<td>
					<input style="width:80px"  type="text" name="award" value="<?php echo $Object->award;?>" /></td>
				<td>
					<input style="width:100px"  type="text" name="coach" value="<?php echo $Object->coach ;?>" /></td>
				<td>
					<input type="submit" name="update" value="更新" />
					<input type="submit" name="delete" value="删除" />
				</td>
			</form>
		</tr>
		<?php } ?>
	</table>
</body>
</html>